import service from '@/utils/request'

export function addOrEditModule(id,data){
    if(id==0){
        return service.post("/api/module/add", data);
    }else{
        return service.post("/api/module/edit", data);
    }
}

export function deleteModule(id){
    return service.post("/api/module/delete?id="+id);
}

export function getModuleList(page, limit){
    return service.get("/api/module/list?page="+page+"&limit="+limit);
}

